package com.erp.service.impl;

import com.erp.entity.Provider;
import com.erp.mapper.ProviderMapper;
import com.erp.service.ProviderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author pyj
 * @since 2020-11-07
 */
@Service
public class ProviderServiceImpl implements ProviderService {

    @Autowired
    private ProviderMapper providerMapper;
    
    @Override
    public Provider findProviderByName(String name) {
        return providerMapper.findProviderByName(name);
    }

    @Override
    public List<Provider> getAll() {
        return providerMapper.getAll();
    }

    @Override
    public int add(Provider provider) {
        return providerMapper.add(provider);
    }

    @Override
    public int delete(Integer id) {
        return providerMapper.delete(id);
    }

    @Override
    public int update(Provider provider) {
        return providerMapper.update(provider);
    }
}
